package com.tanhua.dubbo.api;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.mappers.DimensionsReportMapper;
import com.tanhua.model.db.DimensionsReport;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService
public class DimensionsReportApiImpl implements DimensionsReportApi{

    @Autowired
    private DimensionsReportMapper dimensionsReportMapper;

    @Override
    public void save(DimensionsReport dimensionsReport) {
        dimensionsReportMapper.insert(dimensionsReport);
    }

    @Override
    public List<DimensionsReport> findDimensionByReport(Integer id) {
        QueryWrapper qw = new QueryWrapper();
        qw.eq("report_id",id);
        return dimensionsReportMapper.selectList(qw);
    }
}
